import {promisic} from "./util"

const getSystemSize = async function () {
	const res = await promisic(wx.getSystemInfo)()
	return {
		windowHeight: res.windowHeight,
		windowWidth: res.windowWidth,
		screenHeight: res.screenHeight,
		screenWidth: res.screenWidth
	}
}

const getNavSize = async function() {
	const res = await promisic(wx.getSystemInfo)()
	return  {
		statusBarHeight: res.statusBarHeight,
		navigationHeight: 44
	}
	
}

export {
	getSystemSize,
	getNavSize
}
